import Vue from 'vue'
import Router from 'vue-router'
import store from '../vuex/store'
import config from './config'


Vue.use(Router)

// MainView
import MainView from '../views/MainView.vue'
import IndexView from '../views/IndexView.vue'
import BillView from '../views/BillView.vue'
import BillDetailView from '../views/BillDetailView.vue'
import MineView from '../views/MineView.vue'
import ContactView from '../views/ContactView.vue'

import RepaymentView from '../views/RepaymentView.vue'

import HelpView from '../views/HelpView.vue'

import NotMobileView from '../views/NotMobileView.vue'

import BlackListView from '../views/BlackListView.vue'

import AboutView from '../views/AboutView.vue'

import InfoBaseView from '../views/InfoBaseView.vue'

import InfoWorkView from '../views/InfoWorkView.vue'

import AgreementView from '../views/AgreementView.vue'

import AddBankCardView from '../views/AddBankCardView.vue'

import AddNewBankCardView from '../views/AddNewBankCardView.vue'

import BankCardListView from '../views/BankCardListView.vue'

import AuthView from '../views/AuthView.vue'

import AuthIdView from '../views/AuthIdView.vue'

import AuthZmxyView from '../views/AuthZmxyView.vue'

import OperatorsView from '../views/OperatorsView.vue'

import ApplyView from '../views/ApplyView.vue'

import CheckView from '../views/CheckView.vue'

import IcloudCourseView from '../views/IcloudCourseView.vue'






// BindView
import BindView from '../views/BindView.vue'
import BindPhoneView from '../views/BindPhoneView.vue'


let router = new Router({
    routes: [{
        path: '/main',
        name: 'main',
        component: MainView,
        children: [{
            path: '/index',
            name: 'index',
            // meta:{
            //     title:'借款'
            // },
            component: IndexView,
        },{
            path: '/bill',
            name: 'bill',
            // meta:{
            //     title:'账单'
            // },
            component: BillView,
        },{
            path: '/mine',
            name: 'mine',
            meta:{
                title:'我的'
            },
            component: MineView
        },]
    },{
        path: '/help/',
        name: 'help',
        meta:{
            title:'使用帮助'
        },
        component: HelpView
    },{
        path: '/about',
        name: 'about',
        meta:{
            title:'关于我们'
        },
        component: AboutView
    },{
        path: '/agreement',
        name: 'agreement',
        // meta:{
        //     title:'我正在申请的'
        // },
        component: AgreementView
    },{
        path: '/auth',
        name: 'auth',
        // meta:{
        //     title:'认证'
        // },
        component: AuthView
    },{
        path: '/auth-id',
        name: 'auth-id',
        // meta:{
        //     title:'身份认证'
        // },
        component: AuthIdView
    },{
        path: '/auth-zmxy',
        name: 'auth-zmxy',
        // meta:{
        //     title:'芝麻分认证'
        // },
        component: AuthZmxyView
    },{
        path: '/info-base',
        name: 'info-base',
        // meta:{
        //     title:'个人信息'
        // },
        component: InfoBaseView
    },{
        path: '/info-work',
        name: 'info-work',
        // meta:{
        //     title:'工作信息'
        // },
        component: InfoWorkView
    },{
        path: '/contact',
        name: 'contact',
        // meta:{
        //     title:'紧急联系人'
        // },
        component: ContactView
    },{
        path: '/bankcard-list',
        name: 'bankcard-list',
        // meta:{
        //     title:'银行卡信息'
        // },
        component: BankCardListView
    },{
        path: '/add-bankcard',
        name: 'add-bankcard',
        // meta:{
        //     title:'添加银行卡'
        // },
        component: AddBankCardView
    },{
        path: '/add-new-bankcard',
        name: 'add-new-bankcard',
        // meta:{
        //     title:'添加银行卡'
        // },
        component: AddNewBankCardView
    },{
        path: '/bill-detail/:id',
        name: 'bill-detail',
        // meta:{
        //     title:'账单详情'
        // },
        component: BillDetailView
    },{
        path: '/operators',
        name: 'operators',
        // meta:{
        //     title:'运营商'
        // },
        component: OperatorsView
    },{
        path: '/apply',
        name: 'apply',
        // meta:{
        //     title:'申请借款'
        // },
        component: ApplyView
    },{
        path: '/check',
        name: 'check',
        // meta:{
        //     title:'审核中'
        // },
        component: CheckView
    },{
        path: '/icloud-course',
        name: 'icloud-course',
        // meta:{
        //     title:'iCloud教程'
        // },
        component: IcloudCourseView
    },{
        path: '/not-mobile',
        name: 'not-mobile',
        meta:{
            title:'不支持非移动端设备'
        },
        component: NotMobileView
    },{
        path: '*', redirect: 'index'
    }]
})

new config(router).render()

export default router
